function initConfirmFilter(){
    
    var selectedOption;
    var href = '/function/reservation_list.php';
    $('#formConfirmFilter').live('click', function(){
        $('#formConfirmFilter :selected').each(function(i, selected){ 
            selectedOption = $(selected).text(); 
            $.ajax({
                url: href,           
                type: "post",              
                data: {
                    'dane' : selectedOption 
                },
                success: function(html){   
                    if(html == ""){
                        $.jGrowl('Nie ma rezerwacji o danym statusie');
                    }
                   $('#reservation-result').html(html);
                },
                error: function(result){               
                   console.log(result);
                }
            });
        });
    })
}

$(function(){
    initConfirmFilter();
    $('#formConfirmFilter').trigger('click');

});